package com.Ajava1704.for设计模式.for单例模式;

import java.util.concurrent.Callable;
import java.util.concurrent.CountDownLatch;

/**
 * 作者: LCG
 * 日期: 2020/2/14 15:22
 * 描述:
 */
public class MyCallable implements Callable<ForDanLIObject> {

    private CountDownLatch countDownLatch;

    public MyCallable(CountDownLatch countDownLatch) {
        this.countDownLatch = countDownLatch;
    }

    @Override
    public ForDanLIObject call() throws Exception {

        ForDanLIObject singalObject = ForDanLiMeiJu.SINGAL.getSingalObject();
        countDownLatch.countDown();
        return singalObject;
    }
}
